Deep Learning for Natural Language Processing by Karthiek Reddy Bokka

Deep Learning for Natural Language Processing by Karthiek Reddy Bokka

Author:Karthiek Reddy Bokka
Language: eng
Format: epub
Publisher: Packt Publishing
Published: 2019-06-06T16:00:00+00:00


Note

If you start building a network with an RNN layer, input_shape must be specified.

After a model is built, model.summary() can be used to see the shapes of each layer and the total number of parameters.

Exercise 23: Building an RNN Model to Show the Stability of Parameters over Time

Let's build a simple RNN model to show that the parameters do not change with timesteps. Note that while mentioning the input_shape argument, batch_size need not be mentioned unless needed. It is needed for a stateful network, which we will discuss next. batch_size is mentioned while training the model with the fit() or fit_generator() functions.

The following steps will help you with the solution:

Import the necessary Python packages. We will be using Sequential, SimpleRNN, and Dense.from keras.models import Sequential

from keras.layers import SimpleRNN, Dense



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.